package com.supermarket.manage.provider.outstock.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.supermarket.manage.common.dto.home.request.HomeInitParams;
import com.supermarket.manage.common.dto.home.response.TopDto;
import com.supermarket.manage.common.dto.home.response.TrendDto;
import com.supermarket.manage.common.dto.stock.request.OutstockPageParams;
import com.supermarket.manage.common.pojo.Outstock;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-16 19:29
 **/
@Mapper
public interface OutstockMapper extends BaseMapper<Outstock> {
    /**
     * 条件分页查询出库单
     *
     * @param params
     * @return
     */
    Page<Outstock> getInstockPageList(OutstockPageParams params);

    /**
     * 获取出库相关金额
     *
     * @param params
     * @return
     */
    List<TopDto<Integer>> getSales(HomeInitParams params);

    /**
     * 获取销售趋势
     *
     * @param params
     * @return
     */
    List<TrendDto> getSalesTrend(HomeInitParams params);

    /**
     * 获取购买前十的会员
     *
     * @param params
     * @return
     */
    List<TopDto<String>> getTopMember(HomeInitParams params);

    /**
     * 获取出库单列表
     *
     * @param params
     * @return
     */
    List<Outstock> getOutstockList(OutstockPageParams params);
}
